﻿@model IEnumerable<Models.CMS_Category>
@section head{

}
<style>
    #st {
        padding: 200px;
    }
</style>
< <div>
        <div class="card">
          
            <div class="form-inline card-body">
                <div class="form-group">
                    <label for="name">编号</label>
                    &nbsp; &nbsp;<input type="text" class="form-control" id="cid" placeholder="编号">
                </div>
                <div class="form-group">
                    <button id="sel" class="btn btn-primary">查询</button>
                </div>
            </div>
            </div>
        </div>

  <form id="wu-form" method="post">
      <table id="st" class="table table-bordered table-hover
               text-center" style="padding-left:40%" border="1" height="100%" width="100%">
          <tbody>
              <tr>
                  <th>ID</th>
                  <th>名称</th>
                  <th>英文名</th>
                  <th>导航</th>
                  <th>导航上的顺序</th>
                  <th>是否被搜索</th>
                  <th>操作</th>
              </tr>
              @foreach (var item in Model)
              {
                  <tr>

                      <td>
                          @Html.DisplayFor(x => item.cid)
                      </td>

                      <td>
                          @Html.DisplayFor(x => item.ctitle)
                      </td>
                      <td>
                          @Html.DisplayFor(x => item.cname)
                      </td>
                      <td>
                          @Html.DisplayFor(x => item.nav)
                      </td>
                      <td>
                          @Html.DisplayFor(x => item.navorder)
                      </td>
                      <td>
                          @Html.DisplayFor(x => item.search)
                      </td>
                      <td>
                          @Html.ActionLink("修改", "Update", "Category", new { ID = item.cid }, new { })
                          @Html.ActionLink("删除", "Delete", "Category", new { ID = item.cid }, new { })

                      </td>
                  </tr>
              }


          </tbody>

          <tbody></tbody>

      </table>

  </form>

<script>
    $("#sel").click(function () {
                $.post("@Url.Action("SelectPage")",
                    {
                        pageindex: 1,
                        pagesize: 5,
                        "cid": $("#cid").val(),
                    }, function (data) {
                    dataShow(data);
                    $('#example').bootstrapPaginator(Getoptions(JSON.parse(data)));
                });
            });
       
</script>
 


